{% extends "base.html" %}
{% block title %}{% endblock %}
{% block content %}
<br>
<div  class="layui-body" style="left:0px">
    <br>

        <div id="avg_response_time" style="height:400px;"></div>

    <br>


</div>
<script type="text/javascript">
layui.use(['table','code'], function(){
          var table = layui.table
          ,form = layui.form;
          var $= layui.jquery;

          path = layui.data('test').path;
          $.ajax({
                        //发出请求
                        type:"GET",
                        url:"/case/api/result/time/history",
                        contentType: 'application/json; charset=utf-8',
                        dataType:"json",
                        data:{"path":path},
                        success: function(result){
                            var avg_myChart = echarts.init(document.getElementById('avg_response_time'));
                            avg_response_time_option = {
                                 title: {
                                    text: "response_time",

                                    show : true
                                },
                                xAxis: {
                                    type: 'category',
                                    data:result.dataList,
                                    axisLabel: {
                                        interval:0,
                                        rotate:15
                                    },
                                    boundaryGap:true
                                },
                                yAxis: {
                                    type: 'value'
                                },
                                series: [{
                                    data: result.timelist,
                                    type: 'line',
                                    itemStyle : { normal: {label : {show: true}}}
                                }]
                            };
                            avg_myChart.setOption(avg_response_time_option);
                            var rps_myChart = echarts.init(document.getElementById('list_current_rps'));


                        }
            });



});
</script>
{% endblock %}